<%@ include file="/WEB-INF/views/taglib.jsp" %>
<ul id="menu" class="menu">
	<li class="mega">
		<h2><a href="<spring:url value="/indexView"></spring:url>">Home</a></h2>
	</li>
	<sec:authorize access="authenticated and (hasRole('ACCESS_SUPER_ADMIN') or hasRole('ACCESS_MASTER') or hasRole('ACCESS_ATTENDANCE_TRACKING') or hasRole('ACCESS_WORK_ORDER_TRACKING') or hasRole('ACCESS_MASTER_ASSETMODEL') or hasRole('ACCESS_MASTER_VENDOR')
							or hasRole('ACCESS_MASTER_SERIAL_NO') or hasRole('ACCESS_MASTER_SERIAL_NO_UPDATE') or hasRole('ACCESS_COMPONENT_SEARCH')) ">  
	<li class="mega">
		<h2><a href="#">Manage</a></h2>
		<div>
		<sec:authorize access="authenticated and (hasRole('ACCESS_MASTER_ASSETMODEL') or hasRole('ACCESS_MASTER_SERIAL_NO') or hasRole('ACCESS_MASTER_SERIAL_NO_UPDATE') or hasRole('ACCESS_COMPONENT_SEARCH')) ">  
		<h3>Inventory</h3>
			<p>
			<sec:authorize access="authenticated and hasRole('ACCESS_MASTER_ASSETMODEL')">
		      	
		      	<a href="<spring:url value="/assetModel/search"></spring:url>">Asset Model</a>
		      	
			</sec:authorize>
			
			<sec:authorize access="authenticated and hasRole('ACCESS_COMPONENT_SEARCH') ">
			
				 <a href="<spring:url value="/assetModel/componentSearch"></spring:url>">  Asset Component Stock</a> 
				   
			</sec:authorize>
			
			<sec:authorize access="authenticated and (hasRole('ACCESS_MASTER_SERIAL_NO') or hasRole('ACCESS_MASTER_SERIAL_NO_UPDATE')) ">  
				 
				 <a href="<spring:url value="/assetModel/serialNoSearch"></spring:url>">Serial No. List</a>	   
				 
			</sec:authorize>
			</p>
		</sec:authorize>
		
		<sec:authorize access="authenticated and hasRole('ACCESS_MASTER_VENDOR')">
			<h3>Vendor</h3>
		      <p>
		        <a href="<spring:url value="/vendor/search"></spring:url>">Vendor</a>
		      </p>
		</sec:authorize>
		<sec:authorize access="authenticated and (hasRole('ACCESS_SUPER_ADMIN') or hasRole('ACCESS_MASTER'))">
			<h3>
        	User Access
		    </h3>		
		    <p>
		    <sec:authorize access="authenticated and hasRole('ACCESS_SUPER_ADMIN')">
			<a href="<spring:url value="/user/search"></spring:url>">User</a>,
			<!--  
			<a href="<spring:url value="/role/search"></spring:url>">Roles</a>,
			-->
			</sec:authorize>
			<a href="<spring:url value="/department/search"></spring:url>">Company</a>
			<!--
			<a href="<spring:url value="/section/search"></spring:url>">Section</a>
			-->
			</p>
			<!-- 
			<h3>Inventory</h3>
		      <p>
		      	<a href="<spring:url value="/assetModel/search"></spring:url>">Asset Model</a>,
		        <a href="<spring:url value="/location/search"></spring:url>">Location</a>,
		        <a href="<spring:url value="/assetModel/serialNoSearch"></spring:url>">Serial No. List , </a>
				<a href="<spring:url value="/assetModel/componentSearch"></spring:url>">Asset Component Stock</a>
		   </p>
		     <h3>Vendor</h3>
		      <p>
		        <a href="<spring:url value="/vendor/search"></spring:url>">Vendor</a>
		      </p>
		      </sec:authorize>
		       -->
		      <!-- 
		     <h3>Work Orders</h3>
		      <p>
		        <a href="<spring:url value="/vehicle/search"></spring:url>">Taxi</a>
		      </p>
		       -->
		       
		     <sec:authorize access="authenticated and (hasRole('ACCESS_SUPER_ADMIN') or hasRole('ACCESS_ATTENDANCE_TRACKING') or hasRole('ACCESS_WORK_ORDER_TRACKING')) ">  
		      <h3>Clock In / Out</h3>
		      <p>
		      <sec:authorize access="authenticated and (hasRole('ACCESS_SUPER_ADMIN') or hasRole('ACCESS_ATTENDANCE_TRACKING')) ">
		      	<a href="<c:url value="/attendance/clockInOut"></c:url>">Attendance </a>,
		      	<a href="<c:url value="/attendance/search"></c:url>">Attendance Guard Tracking</a>
		      	</sec:authorize>
		      	<!--  
		      	<sec:authorize access="authenticated and (hasRole('ACCESS_SUPER_ADMIN') or hasRole('ACCESS_WORK_ORDER_TRACKING')) ">
				<a href="<c:url value="/workOrder/clockInOut"></c:url>">Work Order</a>
				</sec:authorize>
				-->
		      </p>
		      </sec:authorize>
		      
		        <sec:authorize access="authenticated and hasRole('ACCESS_SUPER_ADMIN')"> 
		    <h3>System Admin</h3> 
			 <p>
			 	<!-- 
			 	<a href="<spring:url value="/systemCode/search"></spring:url>">System Code</a>, 
			 	<a href="<spring:url value="/archive/search"></spring:url>">Archive</a>
			 	 -->
			 	
				<a href="<spring:url value="/audit/search"></spring:url>">Audit Trail</a>
				
				</p>
				</sec:authorize>
		</div>
	</li>
	</sec:authorize>
	
	<!-- 
	<sec:authorize access="authenticated and (hasRole('ACCESS_SUPER_ADMIN') or hasRole('ACCESS_SERVICE_WO')) ">
	<li class="mega">
		<h2><a href="#">Reception</a></h2>
		<div>
		<h3>Work Orders</h3>
		<p>
			<a href="<spring:url value="/adHoc/search"></spring:url>">Ad-Hoc</a>,
	        <a href="<spring:url value="/workOrder/search"></spring:url>">Service Centre Work Order</a>
		</p>
		</div>
	</li>
	</sec:authorize>	
	 -->

	<!--
	<sec:authorize access="authenticated and (hasRole('ACCESS_SUPER_ADMIN') or hasRole('ACCESS_STOCK_ADJUSTMENT') or hasRole('ACCESS_MONTH_END_CLOSING')
							or hasRole('ACCESS_IO_NEW_COMP') or hasRole('ACCESS_IO_NEW_EQUIP') or hasRole('ACCESS_IO_REPAIR_EQUIP') )">
	<li class="mega">
		<h2><a href="#">Inventory</a></h2>
		<div>
		<h3>
		    Transaction
		</h3>
		<p>
		
		<sec:authorize access="authenticated and (hasRole('ACCESS_SUPER_ADMIN') or hasRole('ACCESS_IO_NEW_COMP') or hasRole('ACCESS_IO_NEW_EQUIP') or hasRole('ACCESS_IO_REPAIR_EQUIP'))">
				<a href="<spring:url value="/issueOrder/search"></spring:url>">Issue Order</a><br>
		</sec:authorize>
		
		<sec:authorize access="authenticated and (hasRole('ACCESS_SUPER_ADMIN') or hasRole('ACCESS_STOCK_ADJUSTMENT'))">
			, <a href="<spring:url value="/stockAdjustment/search"></spring:url>">Stock Adjustment</a>
		</sec:authorize>
		
		<sec:authorize access="authenticated and (hasRole('ACCESS_SUPER_ADMIN') or hasRole('ACCESS_MONTH_END_CLOSING'))">
			, <a href="<spring:url value="/monthEndClosing/search"></spring:url>">Month-End Closing</a>
	    </sec:authorize>
	    
		</p>
		</div>
	</li>
	</sec:authorize>
	
	<sec:authorize access="authenticated and (hasRole('ACCESS_SUPER_ADMIN') or hasRole('ACCESS_PO'))">
	<li class="mega">
		<h2><a href="#">Purchasing</a></h2>
		<div>
		<h3>
		    Transaction
		</h3>
		<p>
		<a href="<spring:url value="/purchaseOrder/search"></spring:url>">Purchase Order</a>
		</p>
		</div>
	</li>
	</sec:authorize>
	
	<sec:authorize access="authenticated and (hasRole('ACCESS_SUPER_ADMIN') or hasRole('ACCESS_DO'))">
	<li class="mega">
		<h2><a href="#">Receiving</a></h2>
		<div>
		<h3>
		    Transaction
		</h3>
		<p>
	        <a href="<spring:url value="/deliveryOrder/search"></spring:url>">Delivery Order</a>
		</p>
		</div>
	</li>
	</sec:authorize>
	-->
	<sec:authorize access="authenticated and (hasRole('ACCESS_SUPER_ADMIN') or hasRole('ACCESS_REPORT_SERVICE') or hasRole('ACCESS_REPORT_INVENTORY'))">
	<li class="mega">
		<h2><a href="#">Report</a></h2>
		<div class="list">
		
		<sec:authorize access="authenticated and (hasRole('ACCESS_SUPER_ADMIN') or hasRole('ACCESS_REPORT_SERVICE'))">
		<p>
	        <a href="<spring:url value="/report/create/Report Center/R01"></spring:url>">Visitor Access Detail Report</a>
	    </p>
	    <p>
	        <a href="<spring:url value="/report/create/Report Center/R02"></spring:url>">Visitor Statistic Report</a>
	    </p>
	    <p>
	        <a href="<spring:url value="/report/create/Report Center/R03"></spring:url>">Security Guard Attendent Report</a>
		</p>
		<p>
	        <a href="<spring:url value="/report/create/Report Center/R04"></spring:url>">Security Guard KPI Report</a>
		</p>
		</sec:authorize>
		
		</div>
	</li>
	</sec:authorize>
	<!-- 
<li class="mega">
  <h2>
    <a href="#">Stuff for him</a>
  </h2>
  <div>
      <h3>
        Menswear
      </h3>
      <p>
        <a href="#">Shirts</a>, 
        <a href="#">T-shirts</a>, 
        <a href="#">Accessories</a>,
        <a href="#">More...</a>
      </p>
      <h3>
        Gifts
      </h3>
      <p>
        <a href="#">Sporting goods</a>, 
        <a href="#">Gadgets</a>, 
        <a href="#">More...</a>
      </p>
      <h3>
        Clearance!
      </h3>
      <p>
        40% off all photo accessories 
        this weekend only. 
        <a href="#">Don't miss out!</a>
      </p>
    <a href="#" class="more">
      More stuff for him...</a>
  </div>
</li>
 -->
</ul>
<script type="text/javascript">

$(document).ready(function() {
    
    function addMega(){     	 
      $(this).addClass("hovering").css('z-index', 2).animate({ backgroundColor: "#EE7700" }, 500);  
    } 

    function removeMega(){
    	
      $(this).removeClass("hovering").css('background-color','');
    }

  var megaConfig = {
       interval: 100,
       sensitivity: 4,
       over: addMega,
       timeout: 500,
       out: removeMega
  };

  $("li.mega").hoverIntent(megaConfig)

    
  });
</script>
